package org.geek4j.business.repository.mybatis.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.geek4j.business.repository.mybatis.domain.User;

/**
 * @author Geek4J
 * @since 2016年3月20日下午6:09:55
 * @description UserMapper interface
 */
public interface UserMapper {

	@Insert("insert into user (name) values(#{name})")
	void save (User user);

	@Select("select * from user")
	List<User> findAll();

	@Select("select * from user where id = #{id}")
	User findById(Long id);

	User findByIdWithRoles(Long id);
}